package com.studio701.carguard.controller;


import com.studio701.carguard.pojo.ReportHumanBloodpressure;
import com.studio701.carguard.service.IReportHumanBloodpressureService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author xjc
 * @since 2022-03-30
 */
@RestController
@RequestMapping("/report-human-bloodpressure")
public class ReportHumanBloodpressureController {

    @Autowired
    IReportHumanBloodpressureService iReportHumanBloodpressureService;

    @ApiOperation("添加血压表")
    @PostMapping("/")
    public boolean insert(@RequestBody ReportHumanBloodpressure reportHumanBloodpressure){
        return iReportHumanBloodpressureService.save(reportHumanBloodpressure);
    }

    @ApiOperation("获取血压表")
    @GetMapping("/")
    ReportHumanBloodpressure getByRhId(Integer id){
        return iReportHumanBloodpressureService.getByRhId(id);
    }
}
